package com.quan.weixin.rpc.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tk.mybatis.mapper.entity.Condition;

import com.quan.base.common.base.service.support.BaseService;
import com.quan.weixin.rpc.api.WeixinSubscribeUserService;
import com.quan.weixin.rpc.dao.mapper.WeixinSubscribeUserMapper;
import com.quan.weixin.rpc.model.WeixinSubscribeUser;

@Service
public class WeixinSubscribeUserServiceImpl extends BaseService<WeixinSubscribeUser, Integer> implements WeixinSubscribeUserService {

	@Autowired
	private WeixinSubscribeUserMapper mapper ;
	
	@Override
	public void deleteByOpenId(String openid) {
		Condition condition = new Condition(WeixinSubscribeUser.class) ;
		condition.createCriteria().andEqualTo("openid", openid) ;
		this.mapper.deleteByCondition(condition) ;
	}

}
